package com.flyweight.self;

import com.command.self.Controller;

import java.util.HashMap;

public class AppFactory {

    private HashMap<String,ConcretAppApplication> apps = new HashMap<>();

    public ConcretAppApplication getAppByType(String type){
        if(!apps.containsKey(type)){
            apps.put(type,new ConcretAppApplication(type));
        }
        return apps.get(type);
    }

    public int getConcretAppApplicationNumber(){
        return apps.size();
    }
}
